package cn.dengqiang.org.service.impl;

import cn.dengqiang.basic.service.impl.BaseServiceImpl;
import cn.dengqiang.basic.util.PageList;
import cn.dengqiang.org.domain.Department;
import cn.dengqiang.org.mapper.DepartmentMapper;

import cn.dengqiang.org.service.IDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(propagation = Propagation.SUPPORTS,readOnly = true)
public class DepartmentServiceImpl extends BaseServiceImpl<Department> implements IDepartmentService {

    @Autowired
    private DepartmentMapper departmentMapper;



    @Override
    public void batchDel(List<Long> ids) {
        departmentMapper.batchRemove(ids);
    }

    @Override
    public List<Department> queryDeptTree() {
        return departmentMapper.loadDeptTree();
    }


}
